# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=minuet
pkgver=22.04.3
pkgrel=0
arch="all !armhf" # armhf blocked by qt5-qtdeclarative
url="https://minuet.kde.org/"
pkgdesc="Minuet Music Education"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtdeclarative-dev qt5-qtquickcontrols2-dev qt5-qtsvg-dev kcoreaddons-dev ki18n-dev kcrash-dev kdoctools-dev fluidsynth-dev samurai"
source="https://download.kde.org/stable/release-service/$pkgver/src/minuet-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang $pkgname-dev"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="
51792343d3e7e52ac500628439bf159ae23acaf1863b0d01bd2e53c15a4f535f493d36a39252eb1e16122b3e47198a98de77bdaa139c502a6a0539ec9dba8d9b  minuet-22.04.3.tar.xz
"
